Dmitry Rogozhkin [Tue, 21 Nov 2023 05:57:32 +0000 (21:57 -0800)]
avcodec/decode: validate hw_frames_ctx when AVHWAccel.free_frame_priv is used
Validate that a hw_frames_ctx is available before using it for
the AVHWAccel.free_frame_priv callback, and don't require it to
be present when the callback is not in use by the HWAccel.